﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FanPages.Common
{
    public class HtmlUtils
    {
        public static string GetFixedString(string text, int max)
        {
            if (max >= text.Length)
                return text;
            var result = new StringBuilder();
            var total = max  - 3;
            result.Append(text.Substring(0, total));
            result.Append("...");
            return result.ToString();
        }
    }
}
